<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>添加下载产品</title>
<link href="${pageContext.request.contextPath }/css/styles.css" rel="stylesheet" type="text/css" />
 <link href="${pageContext.request.contextPath }/css/facebox.css" rel="stylesheet" type="text/css" />
 <link href="${pageContext.request.contextPath }/css/common.css" rel="stylesheet" type="text/css" />
 
     <!-- 日期 -->
    <script type="text/javascript" src="${pageContext.request.contextPath }/jquery/jb51.net/My97DatePicker/WdatePicker.js"></script>
    
 <script src="${pageContext.request.contextPath }/js/jquery-1.7.2.js" type="text/javascript"></script>
 <script type="text/javascript">
$("#sub").click(function(){
			
	if ($("#name").val() == "") {
		alert("产品名称不能为空。");
		return false;
	}
	if ($("#Brand").val() == "") {
		alert("产品品牌名称不能为空.");
		return false;
	}
	if ($("#Repertoire").val() == "") {
		alert("产品包装清单不能为空");
		return false;
	}
	if ($(this).val() == "") {

		alert("产品功能介绍不能为空。");
		return false;
	}
	});
	$("#Brief_Introductionerror").hide();
	$("#Nameerror").hide();
	$("#languageError").hide();
	$("#sizeError").hide();
	$("#tidyDateError").hide();
	$("#name").blur(function() {
		if ($("#name").val() == "") {
			$("#Nameerror").show();
		} else {

			$("#Nameerror").hide();
		}
	});

	$("#language").blur(function() {
		if ($("#language").val() == "") {
			$("#languageError").show();
		} else {

			$("#languageError").hide();
		}
	});
	$("#size").blur(function() {
		if ($("#size").val() == "") {
			$("#sizeError").show();
		} else {

			$("#sizeError").hide();
		}
	});
	$("#tidyDate").blur(function() {
		if ($("#tidyDate").val() == "") {
			$("#tidyDateError").show();
		} else {

			$("#tidyDateError").hide();
		}
	});
	$("#language").blur(function() {
		if ($("#language").val() == "") {
			$("#languageError").show();
		} else {

			$("#languageError").hide();
		}
	});
	$("#Brief_Introduction").blur(function() {
		if ($(this).val() == "") {

			$("#Brief_Introductionerror").show();
		} else {

			$("#Brief_Introductionerror").hide();
		}
	});
	
	$("#second").focus(function(){
		$("#ff").hide();
		
	});
});
</script>
<script type="text/javascript" src="${pageContext.request.contextPath }/js/jquery.min.js"></script>
    <!-- MASTER STYLESHEET-->
    <link href="${pageContext.request.contextPath }/css/styles.css" rel="stylesheet" type="text/css" />
    
    <!-- LOAD TIPSY TOOLTIPS-->
    <script type="text/javascript" src="${pageContext.request.contextPath }/js/jquery.tipsy.js"></script>
   
    <!-- LOAD CUSTOM JQUERY SCRIPTS-->
    <script type="text/javascript" src="${pageContext.request.contextPath }/js/scripts.js"></script>	
    
	 <!-- LOAD FACEBOX -->
	<script type="text/javascript" src="${pageContext.request.contextPath }/js/facebox.js"></script>
    <link href="${pageContext.request.contextPath }/css/facebox.css" rel="stylesheet" type="text/css" />
    

    <!-- LOAD FLOT GRAPHS -->
    <script type="text/javascript" src="${pageContext.request.contextPath }/js/jquery.flot.pack.js"></script>

    <!--[if IE]>
     <script language="javascript" type="text/javascript" src="js/excanvas.pack.js"></script>
    <![endif]-->
    
    
    <!--[if IE 6]>
    <script src="js/pngfix.js"></script>
    <script>
        DD_belatedPNG.fix('.png_bg');
    </script>        
    <![endif]-->

	
    <!-- LOAD GRAPH JAVASCRIPT FILE-->
	<script src="${pageContext.request.contextPath }/js/graphs.js" type="text/javascript"></script>
<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
<script src="${pageContext.request.contextPath }/js/uploadPreview.js" type="text/javascript"></script>
<style type="text/css">
#preview{width:260px;height:190px;border:1px solid #000;overflow:hidden;}
#imghead {filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=image);}
body { overflow-x: hidden; overflow-y: auto; } 
</style> 


</head>
<body>
	<div class="result-wrap" style=" margin-left: 10%;">
		<form
			action="${pageContext.request.contextPath }/download/addDown.action"
			method="post" enctype="multipart/form-data">
			<div class="config-items">
				<div class="config-title">
					<h1>添加产品</h1>
				</div>
				<div class="result-content">
					<table width="100%" class="insert-tab">
						<tr>
							<th width="15%"><i class="require-red">*</i>产品类型：</th>
							<td>
							<select name="type">
									<s:iterator value="#request.list">
										<option><s:property value="Type_Name"/></option>
									</s:iterator>
									<s:iterator value="#request.lists">
										<option><s:property value="firstType.Type_Name"/>-<s:property value="Type_Name"/></option>
									</s:iterator>
							</select>
							</td>
						</tr>
						<tr>
							<th width="15%"><i class="require-red">*</i>产品名称：</th>
							<td><input type="text" id="name" name="name" value=""
								size="85" class="common-text">
								<font id="Nameerror" style="color: red;">不能为空。</font></td>
						</tr>
						<tr>
							<th width="15%"><i class="require-red">*</i>软件语言：</th>
							<td><input type="text" id="language" name="language" value=""
								size="85" class="common-text">
								<font id="languageError" style="color: red;">不能为空。</font></td>
						</tr>
						<tr>
							<th width="15%"><i class="require-red">*</i>产品大小：</th>
							<td><input type="text" id="size" name="size" value=""
								size="85" class="common-text">
								<font id="sizeError" style="color: red;">不能为空。</font></td>
						</tr>
						<tr>
							<th width="15%"><i class="require-red">*</i>整理日期：</th>
							<td><input type="text" id="tidyDate" name="tidyDate" value="" onclick="WdatePicker({dateFmt:'yyyy-MM-dd'})"
								size="85" class="common-text">
								<font id="tidyDateError" style="color: red;">不能为空。</font></td>
						</tr>
						<tr>
							<th width="15%"><i class="require-red">*</i>运行环境：</th>
							<td><input type="text" id="jre" name="jre" value="" 
								size="85" class="common-text">
								<font id=jreError" style="color: red;">不能为空。</font></td>
						</tr>	
						<tr>
							<th width="15%">上传下载软件：</th>
							<td><input type="file" id="file" name="file" value=""
								size="85" class="common-text">
						</tr>
						<tr>
							<th width="15%"><i class="require-red">*</i>产品简介：</th>
							<td>
							<textarea cols="6" rows="3" id="Brief_Introduction" name="Brief_Introduction" class="wysiwyg"></textarea>
								<font id="Brief_Introductionerror" style="color: red;">不能为空。</font></td>
						</tr>
						<tr>
							<th width="15%"><i class="require-red">*</i>是否发布：</th>
							<td><select style="width: 625px;" name="IsPublish"
								class="common-text">
									<option value="false">否</option>
                            		<option value="true">是</option>
							</select></td>
						</tr>
						<tr>
							<th></th>
							<td><input type="submit" id="sub" value="提交"
								class="btn btn-primary btn6 mr10"> <input type="button"
								value="返回" onclick="history.go(-1)" class="btn btn6"></td>
						</tr>
					</table>
				</div>
			</div>
		</form>
	</div>
</body>
</html>